<?php

//manually require following mail library

//Define some sort of service locator to attach...


class FlourishLocator implements Locator
{
    public function getPath($class_name)
    {
        $flourish_root = Config::get('app.third_party_path'). DS.'Flourish/';

        $file = $flourish_root . $class_name . '.php';

        if (file_exists($file))
        {
            return $file;
        }

        return false;
    }

    public function canLocate($class)
    {
        $path = $this->getPath($class);

        if (file_exists($path))
        {
            return true;
        }
        else
        {
            return false;
        }
    }
}